The lexicographically smallest universal cycle for binary strings with minimum specified weight
نویسندگان
چکیده
Fredricksen, Kessler and Maiorana discovered a simple but elegant construction of a universal cycle for binary strings of length n: Concatenate the aperiodic prefixes of length n binary necklaces in lexicographic order. We generalize their construction to binary strings of length n whose weights are in the range c, c + 1, . . . , n by simply omitting the necklaces with weight less than c. We also provide an efficient algorithm that generates the universal cycles in constant amortized time per bit using O(n) space. Our universal cycles have the property of being the lexicographically smallest universal cycle for the set of binary strings of length n.
منابع مشابه
The Coolest Order of Binary Strings
Pick a binary string of length n and remove its first bit b. Now insert b after the first remaining 10, or insert b at the end if there is no remaining 10. Do it again. And again. Keep going! Eventually, you will cycle through all 2 of the binary strings of length n. For example, are the binary strings of length n = 4, where 1 = and 0 = . Che bello! And if you only want strings with weight (num...
متن کاملGeneralizing the Classic Greedy and Necklace Constructions of de Bruijn Sequences and Universal Cycles
We present a class of languages that have an interesting property: For each language L in the class, both the classic greedy algorithm and the classic Lyndon word (or necklace) concatenation algorithm provide the lexicographically smallest universal cycle for L. The languages consist of length n strings over {1, 2, . . . , k} that are closed under rotation with their subset of necklaces also be...
متن کاملUniversal Cycles for Weight-Range Binary Strings
We present an efficient universal cycle construction for the set of binary strings of length n whose weight (number of 1s) are in the range c, c+1, . . . , dwhere 0 ≤ c < d ≤ n. The construction can be implemented to generate each character in constant amortized time using O(n) space which based on a simple lemma for gluing universal cycles together. The Gluing lemma can also be applied to cons...
متن کاملAnalysis of Algorithms for Listing Equivalence Classes of k-ary Strings
We give eecient algorithms for listing equivalence classes of k-ary strings under reversal and permutation of alphabet symbols. As representative of each equivalence class we choose that string which is lexicographically smallest. These algorithms use space O(n) and time O(p kN), where N is the total number of strings generated and n is the length of each string. For k = 2, we obtain a recursiv...
متن کاملEfficient Oracles for Generating Binary Bubble Languages
Given a string α = 10γ in a binary language L, the bubble lower bound is the smallest non-negative integer j such that 1s−10t−j10jγ ∈ L. We present an efficient oracle, which is a function that returns the bubble lower bound, for a number of fixed-density languages including: k-ary Dyck words, connected unit interval graphs, linear-extensions ofB-posets, those lexicographically larger than ω, t...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- J. Discrete Algorithms
دوره 28 شماره
صفحات -
تاریخ انتشار 2014